package com.hfi.flyweight;

/**
 * 静态工厂方法
 * @author ChangLiang
 * @date 2020/4/26
 */
public class IconFactory {

    private static Icon whiteIcon = new IconImpl("PATH TO WHITE ICON");
    private static Icon blackIcon = new IconImpl("PATH TO BLACK ICON");

    private IconFactory(){}

    public static Icon getWhiteIcon() {
        return whiteIcon;
    }

    public static Icon getBlackIcon() {
        return blackIcon;
    }
}
